/**
 * 创建一个编辑器并返回出去
 */
define( [
  'require',
  'jquery',
  'ueditor',
  '../lib/utils',
  'header'
], function( require, $, ued ) {
  var ue = ued.getEditor( 'WxMsgContent', {
    initialFrameHeight: 600,
    open_editor: true,
    style_width: 300,
    toolboxHtml: $( '#autosave_html' ).html(),
    customtagHtml: $( '#edit_more' ).html(),
    customToolbox: [ $( '#custom_toolbarbox' ).html() ],
    topOffset: require( 'header' ).$selector.outerHeight(),
    autoFloatEnabled: true,
    wordCount: true,
    maximumWords: 9999999,
    wordCountMsg: '已输入 {#count} 个字',
    remotoHtmlCallback: function() {
      return require( '../lib/utils' ).remotoHtmlCallback.apply( this, arguments );
    }
  } );

  return ue;
} );